﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ViewRidgeAssistant
{
    public partial class graphics : Form
    {

        private data_source _data_module;

        public graphics()
        {
            InitializeComponent();
        }

        public graphics(data_source data_module)
        {
            InitializeComponent();
            this._data_module = data_module;
            DataSet ds = this._data_module.get_data_table("PurAcqDyn");
            this.chart1.DataSource = ds;
            this.chart1.Series["Продано"].XValueMember = Convert.ToString(ds.Tables["PurAcqDyn"].Columns[0]);
            this.chart1.Series["Продано"].YValueMembers = Convert.ToString(ds.Tables["PurAcqDyn"].Columns[2]);
            this.chart1.Series["Куплено"].XValueMember = Convert.ToString(ds.Tables["PurAcqDyn"].Columns[0]);
            this.chart1.Series["Куплено"].YValueMembers = Convert.ToString(ds.Tables["PurAcqDyn"].Columns[4]);
            this.chart1.Update();
        }

        private void graphics_Load(object sender, EventArgs e)
        {

        }
    }
}
